package com.baizhi.cmfz.restController;

import com.baizhi.cmfz.entity.Album;
import com.baizhi.cmfz.service.AlbumService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@RequestMapping("/album")
@Controller
public class RestAlbumController {
    @Autowired
    private AlbumService albumService;

    @GetMapping("/showSix/{count}")
    @ResponseBody
    public List<Album> showSix(@PathVariable int count){
        return albumService.showSix(count);
    }
}
